package com.liaozibo.demo.seckill.support.export.impl;

import com.liaozibo.demo.seckill.support.export.dto.ProductDTO;
import com.liaozibo.demo.seckill.support.export.dto.Result;
import com.liaozibo.demo.seckill.support.export.service.ProductExportService;
import com.liaozibo.demo.seckill.support.service.ProductService;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;

@DubboService
public class ProductExportServiceImpl implements ProductExportService {

    @Autowired
    private ProductService productService;

    @Override
    public Result<ProductDTO> getProductByCode(String code) {
        ProductDTO productDTO = productService.getProductByCode(code);
        return Result.ok(productDTO);
    }
}
